/*
 * @Author: bor_fish 1219854025@qq.com
 * @Date: 2025-04-24 19:33:25
 * @LastEditors: bor_fish 1219854025@qq.com
 * @LastEditTime: 2025-05-26 16:16:12
 * @FilePath: /myCAN/Diagnostic1.h
*/
#pragma once
#include "Diagnostic_thread.h"

#include <array>
#include <mutex>

//子类1
class Diagnostic1 : public DiagnosticThread {
private:
    CanListener& listener_;
    
    std::vector<DiagnosticError> error_list_; // 错误收集成员
    // 将诊断函数移到类内部作为私有成员函数 
    void check_can_frame(const std::array<unsigned char, 100>& packet, uint32_t frame_id);
    void ThrusterDriverFeedback(const std::array<unsigned char, 100>& packet, uint32_t frame_id);
    void processFrame32021(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32022(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame32031(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32032(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame32041(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32042(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame32051(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32052(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame32061(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32062(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame32071(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32072(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame32081(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
    void processFrame32082(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame320222(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame320223(const std::array<unsigned char, 100>& packet,uint32_t frame_id);

    void processFrame320224(const std::array<unsigned char, 100>& packet,uint32_t frame_id);
public:
    Diagnostic1(CanListener& listener) : DiagnosticThread(0, listener), listener_(listener) {}
    void parseData(void);


};
